using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._3DAnalystTools._Visibility
{
    /// <summary>
    /// <para>Line Of Sight</para>
    /// <para>Determines the visibility of sight lines over obstructions consisting of a surface and an optional multipatch dataset.</para>
    /// <para>确定视线在由表面和可选多面体数据集组成的障碍物上的可见性。</para>
    /// </summary>    
    [DisplayName("Line Of Sight")]
    public class LineOfSight : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public LineOfSight()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_surface">
        /// <para>Input Surface</para>
        /// <para>The integrated mesh scene layer, LAS dataset, raster, TIN, or terrain surface used to determine visibility.</para>
        /// <para>用于确定可见性的集成网格场景图层、LAS 数据集、栅格、TIN 或地形表面。</para>
        /// </param>
        /// <param name="_in_line_feature_class">
        /// <para>Input Line Features</para>
        /// <para><xdoc>
        ///   <para>The line features whose first vertex defines the observation point and last vertex identifies the target location. The heights of the observation and target locations are obtained from the z-values of 3D features and interpolated from the surface for 2D features.</para>
        ///   <para>2D lines also have a default offset of 1 added to their elevation to raise the points above the surface. If the feature has an OffsetA field, its value will be added to the height of the observation point. If the OffsetB field is present, its value will be added to the height of the target position.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>其第一个顶点定义观测点，最后一个顶点标识目标位置的线要素。观测点和目标位置的高度是从 3D 要素的 z 值获得的，并从表面插值 2D 要素。</para>
        ///   <para>2D 线的标高也增加了默认偏移量 1，以将点提升到表面上方。如果要素具有 OffsetA 字段，则其值将添加到观测点的高度。如果存在 OffsetB 字段，则其值将添加到目标位置的高度。</para>
        /// </xdoc></para>
        /// </param>
        /// <param name="_out_los_feature_class">
        /// <para>Output Feature Class</para>
        /// <para>The output line feature class along which visibility has been determined. Two attribute fields are created. The VisCode field indicates visibility along the line: 1 being visible and 2 not visible. The TarIsVis field indicates the target visibility: 0 being not visible and 1 being visible.</para>
        /// <para>已确定可见性的输出线要素类。将创建两个属性字段。VisCode 字段指示沿线的可见性：1 可见，2 不可见。TarIsVis 字段指示目标可见性：0 表示不可见，1 表示可见。</para>
        /// </param>
        public LineOfSight(object _in_surface, object _in_line_feature_class, object _out_los_feature_class)
        {
            this._in_surface = _in_surface;
            this._in_line_feature_class = _in_line_feature_class;
            this._out_los_feature_class = _out_los_feature_class;
        }
        public override string ToolboxName => "3D Analyst Tools";

        public override string ToolName => "Line Of Sight";

        public override string CallName => "3d.LineOfSight";

        public override List<string> AcceptEnvironments => ["XYDomain", "XYResolution", "XYTolerance", "ZDomain", "ZResolution", "ZTolerance", "autoCommit", "configKeyword", "extent", "geographicTransformations", "outputCoordinateSystem", "terrainMemoryUsage", "workspace"];

        public override object[] ParameterInfo => [_in_surface, _in_line_feature_class, _out_los_feature_class, _out_obstruction_feature_class, _use_curvature.GetGPValue(), _use_refraction.GetGPValue(), _refraction_factor, _pyramid_level_resolution, _in_features];

        /// <summary>
        /// <para>Input Surface</para>
        /// <para>The integrated mesh scene layer, LAS dataset, raster, TIN, or terrain surface used to determine visibility.</para>
        /// <para>用于确定可见性的集成网格场景图层、LAS 数据集、栅格、TIN 或地形表面。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Surface")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_surface { get; set; }


        /// <summary>
        /// <para>Input Line Features</para>
        /// <para><xdoc>
        ///   <para>The line features whose first vertex defines the observation point and last vertex identifies the target location. The heights of the observation and target locations are obtained from the z-values of 3D features and interpolated from the surface for 2D features.</para>
        ///   <para>2D lines also have a default offset of 1 added to their elevation to raise the points above the surface. If the feature has an OffsetA field, its value will be added to the height of the observation point. If the OffsetB field is present, its value will be added to the height of the target position.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>其第一个顶点定义观测点，最后一个顶点标识目标位置的线要素。观测点和目标位置的高度是从 3D 要素的 z 值获得的，并从表面插值 2D 要素。</para>
        ///   <para>2D 线的标高也增加了默认偏移量 1，以将点提升到表面上方。如果要素具有 OffsetA 字段，则其值将添加到观测点的高度。如果存在 OffsetB 字段，则其值将添加到目标位置的高度。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Line Features")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_line_feature_class { get; set; }


        /// <summary>
        /// <para>Output Feature Class</para>
        /// <para>The output line feature class along which visibility has been determined. Two attribute fields are created. The VisCode field indicates visibility along the line: 1 being visible and 2 not visible. The TarIsVis field indicates the target visibility: 0 being not visible and 1 being visible.</para>
        /// <para>已确定可见性的输出线要素类。将创建两个属性字段。VisCode 字段指示沿线的可见性：1 可见，2 不可见。TarIsVis 字段指示目标可见性：0 表示不可见，1 表示可见。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Feature Class")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_los_feature_class { get; set; }


        /// <summary>
        /// <para>Output Obstruction Point Feature Class</para>
        /// <para>An optional point feature class identifying the location of the first obstruction on the observer's sight line to its target.</para>
        /// <para>一个可选点要素类，用于标识观察点视线中第一个障碍物到其目标的位置。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Obstruction Point Feature Class")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _out_obstruction_feature_class { get; set; } = null;


        /// <summary>
        /// <para>Use Curvature</para>
        /// <para><xdoc>
        ///   <para>Specifies whether the earth's curvature will be taken into consideration for the line-of-sight analysis. For this parameter to be active, the surface must have a defined spatial reference in projected coordinates with defined z-units.</para>
        ///   <bulletList>
        ///     <bullet_item>Unchecked—The earth's curvature will not be taken into consideration. This is the default.</bullet_item><para/>
        ///     <bullet_item>Checked—The earth's curvature will be taken into consideration.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定在视线分析中是否考虑地球曲率。要使此参数处于活动状态，表面必须在投影坐标中具有定义的空间参考，并具有定义的 z 单位。</para>
        ///   <bulletList>
        ///     <bullet_item>未选中 - 不考虑地球的曲率。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>选中 - 将考虑地球的曲率。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Use Curvature")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _use_curvature_value _use_curvature { get; set; } = _use_curvature_value._false;

        public enum _use_curvature_value
        {
            /// <summary>
            /// <para>CURVATURE</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("CURVATURE")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>NO_CURVATURE</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("NO_CURVATURE")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Use Refraction</para>
        /// <para><xdoc>
        ///   <para>Specifies whether atmospheric refraction will be taken into consideration when generating a line of sight from a functional surface. This parameter does not apply if multipatch features are used.</para>
        ///   <bulletList>
        ///     <bullet_item>Unchecked—Atmospheric refraction will not be taken into consideration. This is the default.</bullet_item><para/>
        ///     <bullet_item>Checked—Atmospheric refraction will be taken into consideration.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定从功能表面生成视线时是否考虑大气折射。如果使用多面体要素，则此参数不适用。</para>
        ///   <bulletList>
        ///     <bullet_item>未选中 - 不考虑大气折射。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>选中 - 将考虑大气折射。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Use Refraction")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _use_refraction_value _use_refraction { get; set; } = _use_refraction_value._false;

        public enum _use_refraction_value
        {
            /// <summary>
            /// <para>REFRACTION</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("REFRACTION")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>NO_REFRACTION</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("NO_REFRACTION")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Refraction Factor</para>
        /// <para>The value to be used in the refraction factor. The default value is 0.13.</para>
        /// <para>要用于折射因子的值。默认值为 0.13。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Refraction Factor")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public double _refraction_factor { get; set; } = 0.13;


        /// <summary>
        /// <para>Pyramid Level Resolution</para>
        /// <para>The z-tolerance or window-size resolution of the terrain pyramid level that will be used. The default value is 0, or full resolution.</para>
        /// <para>将使用的地形金字塔级别的 z 容差或窗口大小分辨率。默认值为 0，即全分辨率。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Pyramid Level Resolution")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public double _pyramid_level_resolution { get; set; } = 0;


        /// <summary>
        /// <para>Input Features</para>
        /// <para>A multipatch feature that may define additional obstructing elements, such as buildings. Refraction options are not honored for this input.</para>
        /// <para>一种多面体要素，可定义其他障碍元素，例如建筑物。此输入不支持折射选项。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Features")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _in_features { get; set; } = null;


        public LineOfSight SetEnv(object XYDomain = null, object XYResolution = null, object XYTolerance = null, object ZDomain = null, object ZResolution = null, object ZTolerance = null, int? autoCommit = null, object configKeyword = null, object extent = null, object geographicTransformations = null, object outputCoordinateSystem = null, object terrainMemoryUsage = null, object workspace = null)
        {
            base.SetEnv(XYDomain: XYDomain, XYResolution: XYResolution, XYTolerance: XYTolerance, ZDomain: ZDomain, ZResolution: ZResolution, ZTolerance: ZTolerance, autoCommit: autoCommit, configKeyword: configKeyword, extent: extent, geographicTransformations: geographicTransformations, outputCoordinateSystem: outputCoordinateSystem, terrainMemoryUsage: terrainMemoryUsage, workspace: workspace);
            return this;
        }

    }

}